#ifndef _QTOGREAPPLICATION_H_
#define _QTOGREAPPLICATION_H_


#include <QtWidgets/QMainWindow>
#include <OGRE/Ogre.h>

#include "GameWidget.h"


/**
 * @brief Qt Ui includes
 * This forward declarations are used to include the Qt UI.
 */
namespace Ui {
class MainWindow;
}

/**
 * @brief The QtOgreApplication class
 * This class implements a QMainWindow to show the GUI and the rendering widget.
 */
class QtOgreApplication : public QMainWindow
{
	Q_OBJECT

public:
	/**
	 * @brief Constructor of QtOgreApplication
	 * @param parent
	 *
	 * This constructor sets up the UI, initializes Ogre and creates a gamewidget.
	 */
	explicit QtOgreApplication(QWidget *parent = 0);

	/**
	 * @brief Destructor of QtOgreApplication
	 */
	~QtOgreApplication();

private slots:
	/**
	 * @brief Slot called when actionClose in GUI is triggered.
	 *
	 * If the user clicks on File -> Close in the GUI, this slot is called.
	 */
	void on_actionClose_triggered();

	void on_actionSettings_triggered();

private:
	/**
	 * @brief Pointer to the UI.
	 */
	Ui::MainWindow *ui;

	/**
	 * @brief Pointer to GameWidget.
	 */
	GameWidget* m_GameWidget;

	/**
	 * @brief Pointer to OgreRoot.
	 */
	Ogre::Root* m_OgreRoot;

	/**
	 * @brief Pointer to OgreRenderSystem.
	 */
	Ogre::RenderSystem* m_OgreRenderSystem;

	/**
	 * @brief Function to initialize Ogre.
	 *
	 * This function loads needed plugins, creates the (OpenGL) rendersystem and adds them to the ui.
	 */
	void InitOgre();
}; // class

#endif // _QTOGREAPPLICATION_H_
